const express = require("express");

const router = express.Router();

const expressJoi = require("@escook/express-joi");

const {
    getGoods,
    addGoods,
    delGood,
    getGood,
    editGood,
} = require("../control/goods");
// const {} = require("../schema/user");

//商品列表
router.get("/goods", getGoods);

//添加商品
router.post("/goods", addGoods);

//删除商品  
router.delete("/goods/:id", delGood);

//根据 ID 查询参数
router.get("/goods/:id", getGood);

//编辑提交参数
router.put("/goods/:id", editGood);

module.exports = router;